function path=getapath(N,type)
finetime=linspace(0,1/2,5001);
deltat=1/2/5000;
path=zeros(size(finetime));
switch type
    case 'ou'
        path(1)=1;
        for ii=2:N
            path(ii)=path(ii-1)+(1-path(ii-1))*deltat+randn(1)*sqrt(deltat);
        end
    case 'sigmadW'
        getou=getapath(5001,'ou');
        for ii=2:N
            path(ii)=path(ii-1)+getou(ii-1)*randn(1)*sqrt(deltat);
        end
end